﻿namespace Sofire.Data
{
    using System.Data.Common;

    #region Delegates

    /// <summary>
    /// 表示 <see cref="Sofire.Data.QueryEngineBase.ExecuteReader(Sofire.Data.ExecuteReaderHandler, Sofire.Data.ExecuteCommand)"/>的委托。
    /// </summary>
    /// <param name="reader">数据读取器。</param>
    public delegate void ExecuteReaderHandler(DbDataReader reader);

    /// <summary>
    /// 表示 <see cref="Sofire.Data.QueryEngineBase.ExecuteReader&lt;TResultValue&gt;(Sofire.Data.ExecuteReaderHandler&lt;TResultValue&gt;, Sofire.Data.ExecuteCommand)"/> 的委托。
    /// </summary>
    /// <typeparam name="TResultValue">返回值的类型。</typeparam>
    /// <param name="reader">数据读取器。</param>
    /// <returns>返回操作结果的值。</returns>
    public delegate TResultValue ExecuteReaderHandler<TResultValue>(DbDataReader reader);

    #endregion Delegates
}